package com.fanqi.nxplayer;

import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;

/**
 * @author:范启 Created on 2020/5/24.
 * Description:
 */
public class Utilx {

    public static float getDensity(Activity activity) {
        DisplayMetrics dm = new DisplayMetrics();
        activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
        return dm.density;
    }
}
